package com.example.pojo;

import java.util.Objects;

/**
 * @author lbq
 * @version 1.0
 * @date 2022/3/27 13:48
 */
public class MyPattern {

    private String ac1;

    private String ac2;

    public MyPattern() {
    }

    public MyPattern(String ac1, String ac2) {
        this.ac1 = ac1;
        this.ac2 = ac2;
    }

    public String getAc1() {
        return ac1;
    }

    public void setAc1(String ac1) {
        this.ac1 = ac1;
    }

    public String getAc2() {
        return ac2;
    }

    public void setAc2(String ac2) {
        this.ac2 = ac2;
    }

    @Override
    public String toString() {
        return "MyPattern{" +
                "ac1='" + ac1 + '\'' +
                ", ac2='" + ac2 + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MyPattern)) return false;

        MyPattern myPattern = (MyPattern) o;

        if (!ac1.equals(myPattern.ac1)) return false;
        return ac2.equals(myPattern.ac2);
    }

    @Override
    public int hashCode() {
        int result = ac1.hashCode();
        result = 31 * result + ac2.hashCode();
        return result;
    }
}
